import React from 'react';
import './App.css';
import Sup from './views/supermarket/Sup'
<<<<<<< HEAD
import order from './views/order/order'

import { Route, BrowserRouter as Router ,Link} from "react-router-dom"
=======
<<<<<<< HEAD
import { Route, BrowserRouter as Router ,Switch,Redirect} from "react-router-dom"
import Home from './views/home'
import Dress_x from './views/dress_x'
import Search_x from './components/search/search_x'
import Food_x from './views/food_x'
import City_x from './components/dress_x/city_x'
=======
import order from './views/order/order'
>>>>>>> 90970c75563bd55771150ee58505cae3aacce616

import { Route, BrowserRouter as Router ,Link} from "react-router-dom"

>>>>>>> 71b05d98825b0de27a4064484a25647f9a927800

class App extends React.Component {


  componentDidMount(){

<<<<<<< HEAD
   let token=localStorage.setItem("token","1")
=======
   let token=localStorage.setItem("token","")
>>>>>>> 90970c75563bd55771150ee58505cae3aacce616
  
  }
     
  render() {
    return (
      <Router>
<<<<<<< HEAD
        <div>
        
         <Route exact path='/' render={()=>
        <Redirect to='/dress' ></Redirect> 
        }></Route>
        <Route path="/Sup" component={ Sup} />
=======
        <div >
<<<<<<< HEAD

        <Route path="/Sup" component={ Sup } />

         <Route path="/order" component={ order } />
=======
>>>>>>> 90970c75563bd55771150ee58505cae3aacce616

        <Route path="/Sup" component={ Sup } />
          <Link id="link1"  to='/Sup'>发现</Link>

         <Route path="/order" component={ order } />
          <Link  id="link2"  to='/order'>订单</Link>
>>>>>>> 71b05d98825b0de27a4064484a25647f9a927800

        <Route path='/home' component={Home} />
        
        <Route path='/city/:did' component={City_x} />
        <Route path='/food/:fid&:fname' component={Food_x} />
        {/* <Switch> */}
        {/* <NavLink to='/home' activeClassName="home_x">外卖</NavLink> */}
       <Route path='/dress' component={Dress_x} />
        {/* </Switch> */}
        <Route path='/search_x' component={Search_x} />
        
        </div>

      </Router>

    );
  }
}

export default App;
